package com.zhangdi.demo.jdbc.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.zhangdi.demo.jdbc.entity.TestTable;
import com.zhangdi.demo.jdbc.mapper.TestTableMapper;
import org.bouncycastle.util.test.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhangdi
 * @version 1.0
 * @date 2022.5.17 0:05
 */
@Service
public class TestTableServiceImpl implements TestTableService {
    @Autowired
    TestTableMapper testTableMapper;

    @Override
    public List<TestTable> findAll() {
        return testTableMapper.findAll();
    }

    @Override
    public TestTable getOne(Long id) {
        return testTableMapper.selectById(id);
    }

    @Override
    public void add(TestTable t) {
        testTableMapper.insert(t);
    }
}
